package 集合框架;

import java.util.*;

public class TestTreeSet {

    public static void main(String[] args) {
        Map<String, Student> studentMap = new HashMap<>();
        Student s1 = new Student("王子虫",21,99);
        Student s2 = new Student("崔根凡",24,99);
        Student s3 = new Student("王者农药",26,99);
        Student s4 = new Student("路人甲",22,99);
        studentMap.put("wz",s1);
        studentMap.put("cgf",s2);
        studentMap.put("wzny",s3);
        studentMap.put("lrj",s4);
        System.out.println("个数为："+studentMap.size());
        System.out.println(studentMap.get("cgf"));

        Collection<Student> values = studentMap.values();
        for (Student stu: values){
            System.out.println(stu);
        }
    }
}